<template>
	<view class="goods-list">
		<view class="goods-double row-between">
			<navigator v-for="(item, index) in list" :key="index" class="item bg-white mt20" hover-class="none" open-type="navigate"
			 :url="`/bundle/pages/fly_restaurant_detail/fly_restaurant_detail?id=${item.id}`">
				<view class="goods-img" style="position:relative;width: 347rpx;height:347rpx;">
					<custom-image :lazy-load="true" width="347rpx" height="347rpx" radius="10rpx" lazy-load :src="item.image"></custom-image>
					<!-- <view class="distance-box row-center">
						<u-icon name="map" color="#FFF" size="24" :custom-style="{marginRight: '6rpx'}"></u-icon>
						{{item.distance}}Km
					</view> -->
				</view>
				<view class="goods-info">
					<view class="goods-name line2">{{item.title}}</view>
					<!-- <view class="collect-box row-between">
						<view class="left row">
							<custom-image :lazy-load="true" width="48rpx" height="48rpx" radius="48rpx" lazy-load :src="item.image"></custom-image>
							<text class="nickname">七小奇</text>
						</view>
						<view class="right row">
							<u-icon name="star" color="#666" size="32"></u-icon>
							<text class="collect-num">74123</text>
						</view>	
					</view> -->
				</view>
			</navigator>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			type: {
				type: String,
				default: 'double'
			},
			list: {
				type: Array,
				default: () => []
			},
            isBargain: {
                type: Boolean,
                default: false
            }
		},
		data() {
			return {

			};
		}
	}
</script>

<style lang="scss" scoped>
	.goods-list {
		.goods-double {
			flex-wrap: wrap;
			padding: 0 20rpx;
			align-items: stretch;
			.item {
				width: 347rpx;
				border-radius: 10rpx;
				.distance-box{
					position: absolute;
					left: 26rpx;
					bottom: 18rpx;
					padding: 12rpx 16rpx;
					background: rgba(0,0,0,0.58);
					border-radius: 8rpx 8rpx 8rpx 8rpx;
					font-size: 24rpx;
					color: #FFFFFF;
				}
				.goods-info {
					padding: 10rpx;
					.goods-name{
						font-weight: 500;
						font-size: 28rpx;
						color: #333333;
						line-height: 40rpx;
					}
					.collect-box{
						margin-top: 20rpx;
						.left{
							.nickname{
								font-size: 20rpx;
								color: #666666;
								line-height: 28rpx;
								margin-left: 12rpx;
							}
						}
						.right{
							.collect-num{
								font-size: 20rpx;
								color: #666666;
								line-height: 28rpx;
								margin-left: 10rpx;
							}
						}
					}
				}
			}
		}
		
		.goods-hot {
			&.goods-home-hot {
				.item {
					padding: 0;
					.paixu,
					.number {
						left: 10rpx;
					}
				}
			}
			.item {
				position: relative;
				padding: 30rpx 20rpx;
				border-radius: 10rpx;
			
				.goods-info {
					width: 450rpx;
			
					.sale {
						padding: 4rpx 18rpx;
						color: #F79C0C;
						background-color: rgba(247, 156, 12, .1);
					}
				}
			
				.paixu,
				.number {
					position: absolute;
					top: 0;
					left: 27rpx;
					width: 50rpx;
					height: 54rpx;
					line-height: 60rpx;
					text-align: center;
					color: #621E09;
				}
			}
		} 

		.goods-one .item {
			padding: 20rpx;
			
			&:not(:last-of-type) {
				margin-bottom: 20rpx;
			}
		}
		.goods-new .item {
		    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.16);
		    border-radius: 10rpx;
		}
		
	}
</style>
